<template>
	<view>
		<view class="uni-margin-wrap">
			<swiper class="swiper" circular :indicator-dots="true" :autoplay="true" :interval="3000"
				:duration="500" style="height: 400rpx">
				<swiper-item v-for="(item, index) in bannerList" :key="index">
					<image :src="item" mode=""></image>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
	import {bannerApi} from "@/api/index.js"
	export default {
		data() {
			return {
				bannerList: []
			}
		},
		mounted() {
			this.getData()
		},
		methods: {
			async getData() {
				const res = await bannerApi();
				this.bannerList = res.result.list;
			}
		}
	}
</script>

<style scoped>
	image {
		width: 100%;
		height: 100%;
	}
</style>